package config

type MysqlInfo struct {
	Host     string `mapstructure:"host" json:"host"`
	Port     int    `mapstructure:"port" json:"port"`
	User     string `mapstructure:"user" json:"user"`
	Password string `mapstructure:"password" json:"password"`
	Name     string `mapstructure:"db" json:"db"`
}

type ConsulInfo struct {
	Host string   `mapstructure:"host" json:"host"`
	Port int      `mapstructure:"port" json:"port"`
	Tags []string `mapstructure:"tags" json:"tags"`
}

type RedisInfo struct {
	Host string `mapstructure:"host" json:"host"`
	Port int    `mapstructure:"port" json:"port"`
}

type ServerConfig struct {
	Name       string     `mapstructure:"name" json:"name"`
	MysqlInfo  MysqlInfo  `mapstructure:"mysql" json:"mysql"`
	ConsulInfo ConsulInfo `mapstructure:"consul" json:"consul"`
	Host       string     `mapstructure:"host" json:"host"`
	RedisInfo  RedisInfo  `mapstructure:"redis" json:"redis"`
}

type NacosInfo struct {
	Host        string `mapstructure:"host"`
	Port        uint64 `mapstructure:"port"`
	NamespaceId string `mapstructure:"namespace_id"`
	DataId      string `mapstructure:"data_id"`
	Group       string `mapstructure:"group"`
}
